﻿import com.dmotiko.general.BaseClip;
import mx.transitions.easing.Strong;
import mx.transitions.Tween;
/**
 * ...
 * @author sminutoli
 */
class com.dmotiko.prune.NewsHeader
extends BaseClip
{
		
	public function show():Void {
		registerTween( "appear", new Tween( this, "_alpha", Strong.easeIn, 0, 100, 0.5, true), false, true );
	}
	
	private function tweenFinished( key:String, tween:Tween):Void {
		if ( key == "appear" ) {
			tween.obj.aTransform = [ 100, 30, 30, 100 ];
			tween.obj.nTransform = 0;
			tween.obj.onEnterFrame = function() {
				if ( this.nTransform == this.aTransform.length ) {
					delete this.onEnterFrame;
					this._parent.showEnd();
					return;
				}
				this._alpha = this.aTransform[ this.nTransform ];
				this.nTransform++;
			}
		}
	}
		
}